package run;

import java.util.Random;

import model.Center;
import model.Event;
import model.Request;
import model.Time;

public class Main {

	private static Random r = new Random();
	
	public static void main(String[] args) {
		Time.currentTime();
		
		final Center c = new Center(null, 1);
		
		
		c.queue(new Request(10));
		
		Time.registerEvent(new Event(5) {
			@Override
			public void perform() {
				c.queue(new Request(10));
				c.queue(new Request(10));
				c.queue(new Request(10));
			}

			@Override
			public String getName() {
				// TODO Auto-generated method stub
				return null;
			}
		});
		
		
		/*
		for (int i = 0; i < 10; ++i) {
			c.queue(new Request(r.nextInt(10) + 1));
		}
		
		Time.registerEvent(new Event(20) {
			@Override
			public void perform() {
				for (int i = 0; i < 5; ++i) {
					c.queue(new Request(r.nextInt(30) + 1));
				}
			}
		});
		*/
		
		Time.run();
	}
}
